/*
 * @Author: XieQiu
 * @Date: 2021-12-23  08:47:33
 * @LastEditTime: 2021-05-21 11:22:33
 * @LastEditors: XieQiu
 * @Description: 奖惩积分管理接口
 */
// import xjaxios from "@/api/axios-line";
// import xjaxiosTwoline from "@/api/axios-systemMark";
import xjaxios from "@/api/axios";

export default {
  /**
   * @description: 获取奖惩积分列表 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @param {Object} entity {componyId: 1} *
   * @param {String} order 排序方式 ASC DESC 默认ASC
   * @param {String} sort 自定义排序方式 'createTime'
   * @return {Array}
   */
  getIntegralRewardList(params) {
    return xjaxios.post("v3/organization/integralReward/queryPageList", params)
  },
  // /**
  //  * @description:奖惩积分 条件查询
  //  * @param null *
  //  * @return {Object}
  //  */
  getStaffListByCondition() {
    return xjaxios.post("v3/organization/employee/queryByCondition", {
      // organizationNo: sessionStorage.organizationNo
    });
  },
  /**
   * @description: 获取所有巡查点列表 *代表必填
   * @param {String} organizationNo *
   * @return {Array}
   */
  getInspectionPointList() {
    return xjaxios.post("v3/organization/integralReward/queryByCondition", {
      organizationNo: sessionStorage.organizationNo
    });
  },
  /**
   * @description: 新增奖惩积分信息
   * @param {Object} formData *
   * @return {Object}
   */
  addIntegralRewardInfo(formData) {
    formData.organizationNo = parseFloat(sessionStorage.organizationNo);
    return xjaxios.post("v3/organization/integralReward/add", formData);
  },
  /**
   * @description: 编辑奖惩积分信息
   * @param {Object} formData *
   * @return {Object}
   */
  editIntegralRewardInfo(formData) {
    return xjaxios.post("v3/organization/integralReward/edit", formData);
  },
  /**
   * @description: 批量删除奖惩积分
   * @param {String} employeeId *
   * @return {Array}
   */
  delListIntegralRewardInfo(list) {
    return xjaxios.post(`v3/organization/integralReward/delList`, {
      integralRewardIdList: list
    });
  },
  /**
   * @description: 批量删除奖惩积分
   * @param {String} employeeId *
   * @return {Array}
   */
  delIntegralRewardInfo(integralRewardId) {
    return xjaxios.post(`v3/organization/integralReward/del/${integralRewardId}`);
  }
};
